package cn.belong.jk.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.belong.jk.entity.Factory;
import cn.belong.jk.service.FactoryService;

@Controller
@RequestMapping("test")
public class TestController extends BaseController{
	
	@Resource
	private FactoryService factoryService;
	
    //列表  
    @RequestMapping("/list.action")  
    public String list(Model model){  
        List<Factory> dataList=factoryService.find(null);  
        model.addAttribute("dataList", dataList);//将数据传递到页面  
      
        return "/baseinfo/factory/jFactoryList.jsp";//转向页面  
    }  

	  //转向新增页面  
    @RequestMapping("/tocreate.action")  
    public void tocreate(){  
        System.out.println("111");
    }  
    
    
}
